package com.wwwarehouse.taskcenter.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by clannad.shao on 2017/11/27.
 * Description:
 */

public class OwnerByBuBean implements Parcelable{


    /**
     * list : [{"businessUnitId":37646,"businessUnitName":"测试内容c55d"}]
     * page : 14812
     * size : 27704
     * total : 11202
     */

    private long page;
    private long size;
    private long total;
    private List<BusinessItem> list;

    public OwnerByBuBean() {
    }

    protected OwnerByBuBean(Parcel in) {
        page = in.readLong();
        size = in.readLong();
        total = in.readLong();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(page);
        dest.writeLong(size);
        dest.writeLong(total);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<OwnerByBuBean> CREATOR = new Creator<OwnerByBuBean>() {
        @Override
        public OwnerByBuBean createFromParcel(Parcel in) {
            return new OwnerByBuBean(in);
        }

        @Override
        public OwnerByBuBean[] newArray(int size) {
            return new OwnerByBuBean[size];
        }
    };

    public long getPage() {
        return page;
    }

    public void setPage(long page) {
        this.page = page;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public List<BusinessItem> getList() {
        return list;
    }

    public void setList(List<BusinessItem> list) {
        this.list = list;
    }

    public static class BusinessItem implements Parcelable{
        /**
         * businessUnitId : 37646
         * businessUnitName : 测试内容c55d
         */

        private String businessUnitId;
        private String businessUnitName;

        public BusinessItem() {
        }

        protected BusinessItem(Parcel in) {
            businessUnitId = in.readString();
            businessUnitName = in.readString();
        }

        public static final Creator<BusinessItem> CREATOR = new Creator<BusinessItem>() {
            @Override
            public BusinessItem createFromParcel(Parcel in) {
                return new BusinessItem(in);
            }

            @Override
            public BusinessItem[] newArray(int size) {
                return new BusinessItem[size];
            }
        };

        public String getBusinessUnitId() {
            return businessUnitId;
        }

        public void setBusinessUnitId(String businessUnitId) {
            this.businessUnitId = businessUnitId;
        }

        public String getBusinessUnitName() {
            return businessUnitName;
        }

        public void setBusinessUnitName(String businessUnitName) {
            this.businessUnitName = businessUnitName;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(businessUnitId);
            dest.writeString(businessUnitName);
        }
    }
}
